<template>
    <div>
        <input type="text" v-model="user.account">
        <br>
        <input type="text" v-model="user.password">
        <br>
        <input type="text" v-model="user.name">
        <br>
        <button @click="register">注册</button>
        <br>
        <router-link to="/login">去登录</router-link>
    </div>
</template>

<script>
    export default {
        name: "",
        data() {
            return {
                user: {}
            }
        },
        created() {

        },
        methods: {
            register() {
                this.$axios.post("/api/user/register", this.user).then(res => {
                    console.log(res);
                })
            }
        }
    }
</script>

<style scoped>

</style>